package com.hxexp.weixin.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import com.hxexp.weixin.common.exception.APIException;
import com.hxexp.weixin.hpe.api.login.LoginAPI;
import com.hxexp.weixin.hpe.api.login.model.LoginParamBean;
import com.hxexp.weixin.hpe.api.login.model.LoginResultBean;
import com.hxexp.weixin.test.runner.JUnit4WithSpringLogClassRunner;

/**
 * HPE登录接口测试
 * @author li.jiang
 *
 */
@RunWith(JUnit4WithSpringLogClassRunner.class)
@ContextConfiguration(locations={"classpath:conf/spring/spring-biz.xml", "classpath:conf/spring/spring-ehcache.xml"})
public class HPELoginAPITester {
    @Autowired
    private LoginAPI loginAPI;
    @Test
    public void testCase01() {
        try {
            LoginResultBean loginResult = loginAPI.login(new LoginParamBean("admin", "admin","0", null));
            System.out.println(loginResult);
            System.out.println(new String(loginResult.getIdentificationTypeName()));
        } catch (APIException e) {
            e.printStackTrace();
        }
    }
}
